3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next

Creating and Editing Tori

QuickDraw 3D provides routines that you can use to create and manipulate tori. See "Tori" for the definition of a torus.

Q3Torus_New

You can use the Q3Torus_New function to create a new torus.

TQ3GeometryObject Q3Torus_New (const TQ3TorusData *torusData);
torusData
A pointer to a TQ3TorusData structure.

DESCRIPTION

The Q3Torus_New function returns, as its function result, a new torus having the shape attributes specified by the torusData parameter. If a new torus could not be created, Q3Torus_New returns the value NULL .

Q3Torus_Submit

You can use the Q3Torus_Submit function to submit an immediate torus for drawing, picking, bounding, or writing.

TQ3Status Q3Torus_Submit (
                     const TQ3TorusData *torusData,
                     TQ3ViewObject view);
torusData
A pointer to a TQ3TorusData structure.
view
A view.

DESCRIPTION

The Q3Torus_Submit function submits for drawing, picking, bounding, or writing the immediate torus whose shape and attribute set are specified by the torusData parameter. The torus is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Torus_GetData

You can use the Q3Torus_GetData function to get the data that defines a torus and its attributes.

TQ3Status Q3Torus_GetData (
                     TQ3GeometryObject torus,
                     TQ3TorusData *torusData);
torus
A torus.
torusData
On exit, a pointer to a TQ3TorusData structure that contains information about the torus specified by the torus parameter.

DESCRIPTION

The Q3Torus_GetData function returns, through the torusData parameter, information about the torus specified by the torus parameter. QuickDraw 3D allocates memory for the TQ3TorusData structure internally; you must call Q3Torus_EmptyData to dispose of that memory.

Q3Torus_SetData

You can use the Q3Torus_SetData function to set the data that defines a torus and its attributes.

TQ3Status Q3Torus_SetData (
                     TQ3GeometryObject torus,
                     const TQ3TorusData *torusData);
torus
A torus.
torusData
A pointer to a TQ3TorusData structure.

DESCRIPTION

The Q3Torus_SetData function sets the data associated with the torus specified by the torus parameter to the data specified by the torusData parameter.

Q3Torus_EmptyData

You can use the Q3Torus_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Torus_GetData .

TQ3Status Q3Torus_EmptyData (TQ3TorusData *torusData);
torusData
A pointer to a TQ3TorusData structure.

DESCRIPTION

The Q3Torus_EmptyData function releases the memory occupied by the TQ3TorusData structure pointed to by the torusData parameter; that memory was allocated by a previous call to Q3Torus_GetData .

Q3Torus_GetOrigin

You can use the Q3Torus_GetOrigin function to get the origin of a torus.

TQ3Status Q3Torus_GetOrigin (
                     TQ3GeometryObject torus,
                     TQ3Point3D *origin);
torus
A torus.
origin
On exit, the origin of the specified torus.

DESCRIPTION

The Q3Torus_GetOrigin function returns, in the origin parameter, the origin of the torus specified by the torus parameter.

Q3Torus_SetOrigin

You can use the Q3Torus_SetOrigin function to set the origin of a torus.

TQ3Status Q3Torus_SetOrigin (
                     TQ3GeometryObject torus,
                     const TQ3Point3D *origin);
torus
A torus.
origin
The desired origin of the specified torus.

DESCRIPTION

The Q3Torus_SetOrigin function sets the origin of the torus specified by the torus parameter to the point specified in the origin parameter.

Q3Torus_GetOrientation

You can use the Q3Torus_GetOrientation function to get the orientation of a torus.

TQ3Status Q3Torus_GetOrientation (
                     TQ3GeometryObject torus,
                     TQ3Vector3D *orientation);
torus
A torus.
orientation
On exit, the orientation of the specified torus.

DESCRIPTION

The Q3Torus_GetOrientation function returns, in the orientation parameter, the orientation of the torus specified by the torus parameter.

Q3Torus_SetOrientation

You can use the Q3Torus_SetOrientation function to set the orientation of a torus.

TQ3Status Q3Torus_SetOrientation (
                     TQ3GeometryObject torus,
                     const TQ3Vector3D *orientation);
torus
A torus.
orientation
The desired orientation of the specified torus.

DESCRIPTION

The Q3Torus_SetOrientation function sets the orientation of the torus specified by the torus parameter to the vector specified in the orientation parameter.

Q3Torus_GetMajorRadius

You can use the Q3Torus_GetMajorRadius function to get the major radius of a torus.

TQ3Status Q3Torus_GetMajorRadius (
                     TQ3GeometryObject torus,
                     TQ3Vector3D *majorRadius);
torus
A torus.
majorRadius
On exit, the major radius of the specified torus.

DESCRIPTION

The Q3Torus_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the torus specified by the torus parameter.

Q3Torus_SetMajorRadius

You can use the Q3Torus_SetMajorRadius function to set the major radius of a torus.

TQ3Status Q3Torus_SetMajorRadius (
                     TQ3GeometryObject torus,
                     const TQ3Vector3D *majorRadius);
torus
A torus.
majorRadius
The desired major radius of the specified torus.

DESCRIPTION

The Q3Torus_SetMajorRadius function sets the major radius of the torus specified by the torus parameter to the vector specified in the majorRadius parameter.

Q3Torus_GetMinorRadius

You can use the Q3Torus_GetMinorRadius function to get the minor radius of a torus.

TQ3Status Q3Torus_GetMinorRadius (
                     TQ3GeometryObject torus,
                     TQ3Vector3D *minorRadius);
torus
A torus.
minorRadius
On exit, the minor radius of the specified torus.

DESCRIPTION

The Q3Torus_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the torus specified by the torus parameter.

Q3Torus_SetMinorRadius

You can use the Q3Torus_SetMinorRadius function to set the minor radius of a torus.

TQ3Status Q3Torus_SetMinorRadius (
                     TQ3GeometryObject torus,
                     const TQ3Vector3D *minorRadius);
torus
A torus.
minorRadius
The desired minor radius of the specified torus.

DESCRIPTION

The Q3Torus_SetMinorRadius function sets the minor radius of the torus specified by the torus parameter to the vector specified in the minorRadius parameter.

Q3Torus_GetRatio

You can use the Q3Torus_GetRatio function to get the ratio of a torus.

TQ3Status Q3Torus_GetRatio (
                     TQ3GeometryObject torus,
                     float *ratio);
torus
A torus.
ratio
On exit, the ratio of the specified torus.

DESCRIPTION

The Q3Torus_GetRatio function returns, in the ratio parameter, the ratio of the torus specified by the torus parameter.

Q3Torus_SetRatio

You can use the Q3Torus_SetRatio function to set the ratio of a torus.

TQ3Status Q3Torus_SetRatio (
                     TQ3GeometryObject torus,
                     float ratio);
torus
A torus.
ratio
The desired ratio of the specified torus.

DESCRIPTION

The Q3Torus_SetRatio function sets the ratio of the torus specified by the torus parameter to the value passed in the ratio parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next